Post

Replies

Boosts

Views

Activity

Can we detect when running behind a Slide Over window?
When an app is running full screen, is there an API to detect when a secondary app is running as a Slide Over window on top? I don't see anything in the lifecycle calls or trait collection that indicates this. Why? I want to modify my app logic when running behind a Slide Over window, as a consequence of this issue where CLLocationManager’s location authorization request API doesn't work as expected when in one of the iPad multitasking modes. That causes a bad user experience where the user clicks a button expecting an authorization prompt, but nothing happens. (A cleaner solution would be to detect when the system defers presenting the location authorization prompt, but that doesn't seem to be supported either. The prompt can eventually appear after dismissing the Slide Over window, but that's too late to help a confused user.)
2
0
866
Oct ’21
iOS 15(?) able to break BSD sockets system-wide on some devices
This is a problem that I can repro on one iPhone 12 Pro Max here, and is reported by a few users in the field, but doesn't repro on any other devices here and I can't find a pattern to it (except all user reports so far are on iOS 15). Depending on how widespread it is, it could be pretty bad. Basically, if you write a simple socket-based app to (in my case) connect to an HTTP server, send a GET request for a very large file, read some bytes of the response, and then close the socket before the download completes, then after one or more iterations of this sequence, it stops working. Specifically, after it "breaks", then subsequently trying to connect a socket to any host at all fails by timing out. It remains "broken" even after killing and relaunching my app. And (here's the scary part) BSD sockets are now "broken" for all other apps on the device and remain broken until you reboot the device. It’s as if the BSD network stack in the OS kernel has fallen over. Really. Of course I'm preparing to submit an FB including a minimalist sample app that demonstrates the issue. But it seems like a rare occurrence that luckily happens to affect my own phone, so I wanted to see if this sounds familiar to anyone else. I'm thinking there's nothing an app should be able to do within its own process/sandbox that should affect the behavior of system APIs for other apps and require a reboot to fix. So, yeah.
5
0
1.2k
Oct ’21
NSLocationTemporaryUsageDescriptionDictionary crashes Xcode 13
I just submitted a feedback for this (FB9662125) but in the spirit of “share and enjoy”… The cool new Generate Info.plist File feature in Xcode 13 crashes if you try to put an NSLocationTemporaryUsageDescriptionDictionary in your Info.plist file. Here’s a simple repro scenario: Create a minimal iOS app (no Core Data, no tests) Go to target settings → Info tab → Custom iOS Target Properties Click the (+) button on any row to begin inserting a new row Select Privacy - Location Temporary Usage Description Dictionary Click somewhere else or press Return to commit the selection Xcode crashes immediately More generally, it seems that Xcode crashes any time it tries to regenerate your Info.plist file if it contains an NSLocationTemporaryUsageDescriptionDictionary, even if (for example) you manually pasted that dictionary into the file earlier. In that case, merely tapping the (+) button in step 3 above is enough to crash it.
13
3
2.8k
Sep ’21